<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>垂直居中</title>
    <style>
        /*方案一，flex，IE9以上才能兼容*/
        .flex {
            height: 300px;
            width: 300px;
            background: red;
            display: flex;
            flex-direction: row;
            margin: auto;
            align-items: center;
            justify-content: center;
        }

        /*方案二，不是做表格的话，很少用*/
        ul {
            width: 300px;
            height: 200px;
            margin: 10px auto;
            background: red;
            display: table;
        }

        li {
            display: table-cell;
            vertical-align: middle;
        }

    </style>
</head>
<body>

<div class="flex">
    <a href="">发表评论</a>
</div>

<ul>
    <li><a href="">主站</a></li>
    <li><a href="">番剧</a></li>
    <li><a href="">游戏</a></li>
    <li><a href="">直播</a></li>
    <li><a href="">漫画</a></li>
</ul>


</body>
</html>